home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 April / Software of the Month Club 1996 April.iso / pc / os2 / psutils / src / fixscr~1.pl < prev    next >
Text File  |  1996-02-21  |  415b  |  20 lines

  1. @PERL@
  2. # fixscribeps: get conforming PostScript out of Scribe
  3. #
  4. # Copyright (C) Angus J. C. Duggan 1991-1995
  5. # See file LICENSE for details.
  6.  
  7. $inepsf = 0;
  8. $epsfn = 0;
  9. while (<>) {
  10.    if (/^([0-9]+ [0-9]+ [0-9]+ PB) (%!.*)/) {
  11.       print "$1\n%%BeginDocument: Scribe-EPSF $epsfn 0\n$2\n";
  12.       $inepsf++;
  13.    } elsif (/^ PE/ && $inepsf) {
  14.       print "%%EndDocument\n", $_;
  15.    } else {
  16.       print $_;
  17.    }
  18. }
  19. @END@
  20.